package plan;

import java.io.Serializable;
import java.util.ArrayList;

public class TestReport implements Serializable {

    ArrayList<String> name = new ArrayList<>(); // Request Name
    ArrayList<Integer> samples = new ArrayList<>(); //请求数
    ArrayList<Double> average = new ArrayList<>(); //平均响应时间
    ArrayList<Long> media = new ArrayList<>(); //中位数，50%用户响应时间
    ArrayList<Long> line90 = new ArrayList<>(); //90%用户响应时间
    ArrayList<Long> line95 = new ArrayList<>();
    ArrayList<Long> line99 = new ArrayList<>();
    ArrayList<Long> min = new ArrayList<>(); //最小响应时间
    ArrayList<Long> max = new ArrayList<>(); //最大响应时间
    ArrayList<Float> error = new ArrayList<>(); //错误数
    ArrayList<Double> throughput = new ArrayList<>(); //吞吐量

    public TestReport() {
    }

    public TestReport(ArrayList<String> name, ArrayList<Integer> samples, ArrayList<Double> average,
                      ArrayList<Long> media, ArrayList<Long> line90, ArrayList<Long> line95,
                      ArrayList<Long> line99, ArrayList<Long> min, ArrayList<Long> max,
                      ArrayList<Float> error, ArrayList<Double> throughput) {
        this.name = name;
        this.samples = samples;
        this.average = average;
        this.media = media;
        this.line90 = line90;
        this.line95 = line95;
        this.line99 = line99;
        this.min = min;
        this.max = max;
        this.error = error;
        this.throughput = throughput;
    }

    public ArrayList<String> getName() {
        return name;
    }

    public void setName(String name) {
        this.name.add(name);
    }

    public ArrayList<Integer> getSamples() {
        return samples;
    }

    public void setSamples(int samples) {
        this.samples.add(samples);
    }

    public ArrayList<Double> getAverage() {
        return average;
    }

    public void setAverage(double average) {
        this.average.add(average);
    }

    public ArrayList<Long> getMedia() {
        return media;
    }

    public void setMedia(Long media) {
        this.media.add(media);
    }

    public ArrayList<Long> getLine90() {
        return line90;
    }

    public void setLine90(Long line90) {
        this.line90.add(line90);
    }

    public ArrayList<Long> getLine95() {
        return line95;
    }

    public void setLine95(Long line95) {
        this.line95.add(line95);
    }

    public ArrayList<Long> getLine99() {
        return line99;
    }

    public void setLine99(Long line99) {
        this.line99.add(line99);
    }

    public ArrayList<Long> getMin() {
        return min;
    }

    public void setMin(Long min) {
        this.min.add(min);
    }

    public ArrayList<Long> getMax() {
        return max;
    }

    public void setMax(Long max) {
        this.max.add(max);
    }

    public ArrayList<Float> getError() {
        return error;
    }

    public void setError(float error) {
        this.error.add(error);
    }

    public ArrayList<Double> getThroughput() {
        return throughput;
    }

    public void setThroughput(double throughput) {
        this.throughput.add(throughput);
    }
}